import 'dart:convert';

import 'package:enterprise_v6_app/app/data/common/choice_bean.dart';
import 'package:enterprise_v6_app/generated/json/base/json_field.dart';
import 'package:enterprise_v6_app/generated/json/process_list_entity.g.dart';

export 'package:enterprise_v6_app/generated/json/process_list_entity.g.dart';

///流程模板实体类
@JsonSerializable()
class ProcessListEntity extends ChoiceBean {
  ProcessListEntity();

  factory ProcessListEntity.fromJson(Map<String, dynamic> json) =>
      $ProcessListEntityFromJson(json);

  ///	业务编码
  String? businessCode = '';

  ///	业务id
  String? businessId = '';

  ///	业务类型 1：动火作业 2：受限空间作业 3：盲板抽堵作业 4：高处作业 5：吊装作业 6：临时用电作业 7：动土作业 8：断路作业 A：倒罐作业 B：清罐作业 C：切水作业
  String?  businessType = '';

  ///	证书类型id
  String? certificateTypeId = '';

  ///	企业唯一编码
  String? companyCode = '';

  ///	创建人
  String? createBy = '';

  ///	创建时间
  String? createDate = '';

  ///	部署时间
  String? deploymentTime = '';

  ///	主键id
  String? id = '';

  ///	流程唯一编码
  String? processEncoding = '';

  ///	备注
  String? remark = '';

  ///	模板名称
  String? templateName = '';

  /// 最后修改人
  String? updateBy = '';

  /// 最后修改人
  String? updateDate = '';

  Map<String, dynamic> toJson() => $ProcessListEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }

  @override
  String getId() {
    return id ?? '';
  }

  @override
  String getShowName() {
    return templateName ?? 's';
  }

}
